package ip;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class inetaddress {
    public static void main(String[] args) throws UnknownHostException {
            InetAddress address = InetAddress.getByName("Edsion的Windows设备");
        String name = address.getHostName();
        System.out.println(name);
        String ip = address.getHostAddress();
        System.out.println(ip);






    }
}
